﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CardInChina.Bussiness.Frontend.Models
{
    public class GamesByIndex
    {
        //A\B\C...Z
        public string IndexName { get; set; }
        public IEnumerable<Game> Games { get; set; }
        public static GamesByIndex FindByIndex(IEnumerable<GamesByIndex> games , string index)
        {
            if(string.IsNullOrEmpty(index)) return null;
            if(games == null) return null;
            return games.FirstOrDefault(p => p.IndexName == index);
        }
    }
}
